package com.canyou.oa.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.canyou.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 动态表单项目表
 * </p>
 *
 * @author canyou
 * @since 2021-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("oa_item")
@ApiModel(value="Item对象", description="动态表单项目表")
public class Item extends BaseModel {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "父项目id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "可选项id")
    @TableField("option_id")
    private Long optionId;

    @ApiModelProperty(value = "控件编号")
    @TableField("item_code")
    private String itemCode;

    @ApiModelProperty(value = "控件名称")
    @TableField("item_name")
    private String itemName;

    @ApiModelProperty(value = "控件类型(input, date-picker, radio, checkbox, switch, select, city-select, label)")
    @TableField("item_type")
    private String itemType;

    @ApiModelProperty(value = "是否必填(0: 否, 1: 是)")
    @TableField("is_required")
    private Integer isRequired;

    @ApiModelProperty(value = "输入提示语")
    @TableField("place_holder")
    private String placeHolder;

    @ApiModelProperty(value = "默认值")
    @TableField("default_val")
    private String defaultVal;

    @ApiModelProperty(value = "校验约束(正则)")
    @TableField("validate")
    private String validate;

    @ApiModelProperty(value = "是否预设表单项（0: 否，1: 是）")
    @TableField("is_pre_set")
    private Integer isPreSet;

}
